#include "DerivedCircle.h"

// Construct a default circle object
Circle::Circle()
{
	radius = 1;
}

// Construct a circle object with specified radius
Circle::Circle(double radius)
{
	setRadius(radius);
}

// Construct a circle object with specified radius,
//  color and filled values 
Circle::Circle(double radius, const string& color, bool filled)
{
	setRadius(radius);
	setColor(color);
	setFilled(filled);
}

// Return the radius of the circle
double Circle::getRadius() const
{
	return radius;
}

// set a new radius
void Circle::setRadius(double radius)
{
	this->radius = (radius >= 0) ? radius : 0;
}

// Return the area of this circle
double Circle::getArea() const
{
	return radius * radius * 3.14159;
}

//  Return the perimeter of this circle
double Circle::getPerimeter() const 
{
	return 2 * radius * 3.14159;
}

// Return the diameter of this circle
double Circle::getDiameter() const 
{
	return 2 * radius;
}

// Redefine the toString() const
string Circle::toString() const
{
	return "Circle object";
}




































